package com.yindong.camera.slice;

import com.yindong.camera.ResourceTable;
import com.yindong.camera.util.PermissionUtil;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

public class MainAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        // 权限申请
        PermissionUtil.permissionApply(this, 1,
                // 摄像机权限
                "ohos.permission.CAMERA",
                // 麦克风权限
                "ohos.permission.MICROPHONE",
                "ohos.permission.LOCATION");
        // 调用Camera模块业务层
        CameraService.initCameraService(this);


    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
